package com.yanqu.road.server.cmd.activity.washe;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.WasheProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.washe.WasheModule;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_WASHE_SEASON_0_SHOW, desc = "")
public class WasheGetSeason0ShowCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        boolean needShow = player.getModule(WasheModule.class).getSeason0ShowByCmd();

        WasheProto.WasheSeason0ShowRespMsg.Builder builder = WasheProto.WasheSeason0ShowRespMsg.newBuilder();
        builder.setNeedShow(needShow);
        player.sendPacket(ClientProtocol.U_WASHE_SEASON_0_SHOW, builder);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
